package com.es.disped.dao.oj.mapper;

import com.es.disped.dao.oj.model.Printer;
import com.es.disped.dao.oj.model.PrinterExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface PrinterMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=PrinterSqlProvider.class, method="countByExample")
    long countByExample(PrinterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @DeleteProvider(type=PrinterSqlProvider.class, method="deleteByExample")
    int deleteByExample(PrinterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Delete({
        "delete from printer",
        "where printer_id = #{printerId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer printerId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Insert({
        "insert into printer (printer_id, user_id, ",
        "in_date, status, ",
        "worktime, printer, ",
        "content)",
        "values (#{printerId,jdbcType=INTEGER}, #{userId,jdbcType=CHAR}, ",
        "#{inDate,jdbcType=TIMESTAMP}, #{status,jdbcType=SMALLINT}, ",
        "#{worktime,jdbcType=TIMESTAMP}, #{printer,jdbcType=CHAR}, ",
        "#{content,jdbcType=LONGVARCHAR})"
    })
    int insert(Printer record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @InsertProvider(type=PrinterSqlProvider.class, method="insertSelective")
    int insertSelective(Printer record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=PrinterSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="printer_id", property="printerId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.CHAR),
        @Result(column="in_date", property="inDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="status", property="status", jdbcType=JdbcType.SMALLINT),
        @Result(column="worktime", property="worktime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="printer", property="printer", jdbcType=JdbcType.CHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<Printer> selectByExampleWithBLOBs(PrinterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=PrinterSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="printer_id", property="printerId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.CHAR),
        @Result(column="in_date", property="inDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="status", property="status", jdbcType=JdbcType.SMALLINT),
        @Result(column="worktime", property="worktime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="printer", property="printer", jdbcType=JdbcType.CHAR)
    })
    List<Printer> selectByExample(PrinterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Select({
        "select",
        "printer_id, user_id, in_date, status, worktime, printer, content",
        "from printer",
        "where printer_id = #{printerId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="printer_id", property="printerId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.CHAR),
        @Result(column="in_date", property="inDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="status", property="status", jdbcType=JdbcType.SMALLINT),
        @Result(column="worktime", property="worktime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="printer", property="printer", jdbcType=JdbcType.CHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    Printer selectByPrimaryKey(Integer printerId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=PrinterSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Printer record, @Param("example") PrinterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=PrinterSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") Printer record, @Param("example") PrinterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=PrinterSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Printer record, @Param("example") PrinterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=PrinterSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Printer record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Update({
        "update printer",
        "set user_id = #{userId,jdbcType=CHAR},",
          "in_date = #{inDate,jdbcType=TIMESTAMP},",
          "status = #{status,jdbcType=SMALLINT},",
          "worktime = #{worktime,jdbcType=TIMESTAMP},",
          "printer = #{printer,jdbcType=CHAR},",
          "content = #{content,jdbcType=LONGVARCHAR}",
        "where printer_id = #{printerId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(Printer record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table printer
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Update({
        "update printer",
        "set user_id = #{userId,jdbcType=CHAR},",
          "in_date = #{inDate,jdbcType=TIMESTAMP},",
          "status = #{status,jdbcType=SMALLINT},",
          "worktime = #{worktime,jdbcType=TIMESTAMP},",
          "printer = #{printer,jdbcType=CHAR}",
        "where printer_id = #{printerId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Printer record);
}